<template>
  <div class="recommend">
    <div v-for="(item, index) in recommend" :key="index">
      <a :href="item.link">
        <img :src="item.image" />
        <div>{{ item.title }}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "RecommendView",
  props: {
    recommend: {
      type: Array,
      default() {
        return [];
      }
    }
  }
};
</script>

<style lang="less" scoped>
.recommend {
  display: flex;
  > div {
    box-sizing: border-box;
    padding: 0.5rem;
    flex: 1;
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    img {
      width: 100%;
    }
  }
}
</style>
